Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Embedding Controls /


GetRootControl

NEW WITH THE APPEARANCE MANAGER

Returns a handle to a window's root control.

pascal OSErr GetRootControl (
                     WindowPtr inWindow,
                     ControlHandle* outControl);
inWindow
On input, a pointer to the root control's owning window.
outControl
On output, a pointer to a handle to the root control.
function result
A result code; see "Result Codes". The result code errNoRootControl indicates that there is no root control in the specified window.
DISCUSSION
You can call GetRootControl to determine whether or not a root control (and therefore an embedding hierarchy) exists within a specified window. Once you have the root control's handle, you can pass it to functions such as DisposeControl, ActivateControl, and DeactivateControl to apply specified actions to the entire embedding hierarchy.

Note
The minimum, maximum, and initial settings for a root control are reserved and should not be changed.
SEE ALSO
"Embedding Controls".

"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998